/**
 * Mock数据文件
 * 包含所有模拟数据，用于替代真实的API调用
 */

// 用户信息数据
export const mockUserInfo = {
  employee_info: {
    id: '1',
    name: '管理员',
    mobile: '13800138000',
    email: 'admin@example.com',
    department_id: '1',
    department_name: '总经理办公室',
    role_id: '1',
    role_name: '超级管理员',
    status: '1',
    avatar: '',
    create_time: '2024-01-01 00:00:00',
    last_login_time: '2024-12-19 10:00:00'
  },
  func_list: [
    {
      id: '1',
      name: '用户管理',
      code: 'user_manage',
      menu_name: '用户管理',
      menu_url: '/user/manage',
      orderid: 1
    },
    {
      id: '2',
      name: '角色管理',
      code: 'role_manage',
      menu_name: '角色管理',
      menu_url: '/role/manage',
      orderid: 2
    },
    {
      id: '3',
      name: '菜单管理',
      code: 'menu_manage',
      menu_name: '菜单管理',
      menu_url: '/menu/manage',
      orderid: 3
    },
    {
      id: '4',
      name: '部门管理',
      code: 'dept_manage',
      menu_name: '部门管理',
      menu_url: '/dept/manage',
      orderid: 4
    },
    {
      id: '5',
      name: '系统设置',
      code: 'system_setting',
      menu_name: '系统设置',
      menu_url: '/system/setting',
      orderid: 5
    }
  ],
  menu_list: [
    {
      id: '1',
      menu_name: '系统管理',
      menu_url: '',
      menu_icon: 'Setting',
      level: 1,
      orderid: 1,
      children: [
        {
          id: '11',
          menu_name: '用户管理',
          menu_url: 'department/index',
          menu_icon: 'User',
          level: 2,
          orderid: 1
        },
        {
          id: '12',
          menu_name: '角色管理',
          menu_url: 'role/index',
          menu_icon: 'UserFilled',
          level: 2,
          orderid: 2
        },
        {
          id: '13',
          menu_name: '菜单管理',
          menu_url: 'menu/index',
          menu_icon: 'Menu',
          level: 2,
          orderid: 3
        }
      ]
    },
    {
      id: '2',
      menu_name: '系统设置',
      menu_url: '',
      menu_icon: 'Tools',
      level: 1,
      orderid: 2,
      children: [
        {
          id: '21',
          menu_name: '系统配置',
          menu_url: 'sys/setting',
          menu_icon: 'Setting',
          level: 2,
          orderid: 1
        },
        {
          id: '22',
          menu_name: '系统公告',
          menu_url: 'sys/notice',
          menu_icon: 'Bell',
          level: 2,
          orderid: 2
        }
      ]
    },
    {
      id: '3',
      menu_name: '日志管理',
      menu_url: '',
      menu_icon: 'Document',
      level: 1,
      orderid: 3,
      children: [
        {
          id: '31',
          menu_name: '登录日志',
          menu_url: 'logs/login',
          menu_icon: 'Key',
          level: 2,
          orderid: 1
        },
        {
          id: '32',
          menu_name: '操作日志',
          menu_url: 'logs/operation',
          menu_icon: 'EditPen',
          level: 2,
          orderid: 2
        }
      ]
    }
  ],
  init_option: {
    company_name: 'Mock管理系统',
    system_name: 'Vue Mock Admin',
    version: '1.0.0',
    copyright: '© 2024 Mock Company',
 
    common_option: {
      // 部门选项数据（树形结构）
      depart_option: [
        {
          id: '1',
          name: '总公司',
          dpname: '总公司',
          level: 1,
          children: [
            {
              id: '11',
              name: '技术部',
              dpname: '技术部',
              level: 2,
              children: [
                { id: '111', name: '前端组', dpname: '前端组', level: 3 },
                { id: '112', name: '后端组', dpname: '后端组', level: 3 },
                { id: '113', name: '测试组', dpname: '测试组', level: 3 }
              ]
            },
            {
              id: '12',
              name: '销售部',
              dpname: '销售部',
              level: 2,
              children: [
                { id: '121', name: '华北区', dpname: '华北区', level: 3 },
                { id: '122', name: '华南区', dpname: '华南区', level: 3 },
                { id: '123', name: '华东区', dpname: '华东区', level: 3 }
              ]
            },
            {
              id: '13',
              name: '人事部',
              dpname: '人事部',
              level: 2,
              children: [
                { id: '131', name: '招聘组', dpname: '招聘组', level: 3 },
                { id: '132', name: '培训组', dpname: '培训组', level: 3 }
              ]
            },
            {
              id: '14',
              name: '财务部',
              dpname: '财务部',
              level: 2,
              children: [
                { id: '141', name: '会计组', dpname: '会计组', level: 3 },
                { id: '142', name: '出纳组', dpname: '出纳组', level: 3 }
              ]
            }
          ]
        }
      ],
      // 用户选项数据
      user_option: [
        { id: '1', name: '张三', realname: '张三', did: '111', role_id: '1', dpname: '前端组' },
        { id: '2', name: '李四', realname: '李四', did: '112', role_id: '2', dpname: '后端组' },
        { id: '3', name: '王五', realname: '王五', did: '121', role_id: '3', dpname: '华北区' },
        { id: '4', name: '赵六', realname: '赵六', did: '122', role_id: '2', dpname: '华南区' },
        { id: '5', name: '钱七', realname: '钱七', did: '131', role_id: '4', dpname: '招聘组' },
        { id: '6', name: '孙八', realname: '孙八', did: '141', role_id: '5', dpname: '会计组' }
      ],
      // 角色选项数据
      role_option: [
        { id: '1', role_name: '超级管理员' },
        { id: '2', role_name: '部门经理' },
        { id: '3', role_name: '销售员' },
        { id: '4', role_name: '人事专员' },
        { id: '5', role_name: '财务专员' }
      ],
      // 部门类型选项
      depart_type_option: {
        '1': '销售部门',
        '2': '技术部门',
        '3': '管理部门',
        '4': '财务部门',
        '5': '人事部门'
      },
      // 系统配置选项
      system_config: {
        upload_max_size: 10, // MB
        session_timeout: 30, // 分钟
        password_min_length: 6,
        enable_captcha: false // Mock模式下禁用验证码
      }
    }
  },
  // 公告数据
  notice: [
    {
      id: '1',
      title: '系统升级公告',
      content: '<p>系统将于本周末进行升级维护，届时可能会有短暂的服务中断，请大家提前做好准备。</p><p>升级内容包括：</p><ul><li>性能优化</li><li>安全性增强</li><li>新功能上线</li></ul>',
      addtime: '2024-12-19 10:00:00'
    },
    {
      id: '2',
      title: '新功能发布通知',
      content: '<p>我们很高兴地宣布，新的用户管理功能已经上线！</p><p>主要特性：</p><ul><li>更直观的用户界面</li><li>批量操作支持</li><li>高级筛选功能</li></ul>',
      addtime: '2024-12-18 14:30:00'
    },
    {
      id: '3',
      title: '节假日安排通知',
      content: '<p>根据国家法定节假日安排，元旦期间系统运行时间调整如下：</p><p>12月31日：正常运行</p><p>1月1日：系统维护</p><p>1月2日：恢复正常</p>',
      addtime: '2024-12-17 09:15:00'
    }
  ]
}

// 部门数据
export const mockDepartments = [
  {
    id: '1',
    name: '总经理办公室',
    dpname: '总经理办公室',
    parent_id: '0',
    level: 1,
    orderid: 1,
    status: '1',
    children: [
      {
        id: '11',
        name: '人事部',
        dpname: '人事部',
        parent_id: '1',
        level: 2,
        orderid: 1,
        status: '1'
      },
      {
        id: '12',
        name: '财务部',
        dpname: '财务部',
        parent_id: '1',
        level: 2,
        orderid: 2,
        status: '1'
      }
    ]
  },
  {
    id: '2',
    name: '技术部',
    dpname: '技术部',
    parent_id: '0',
    level: 1,
    orderid: 2,
    status: '1',
    children: [
      {
        id: '21',
        name: '前端组',
        dpname: '前端组',
        parent_id: '2',
        level: 2,
        orderid: 1,
        status: '1'
      },
      {
        id: '22',
        name: '后端组',
        dpname: '后端组',
        parent_id: '2',
        level: 2,
        orderid: 2,
        status: '1'
      }
    ]
  }
]

// 角色数据
export const mockRoles = [
  {
    id: '1',
    name: '超级管理员',
    role_name: '超级管理员',
    description: '拥有所有权限',
    weight: '100',
    orderid: '1',
    status: '1',
    create_time: '2024-01-01 00:00:00'
  },
  {
    id: '2',
    name: '普通管理员',
    role_name: '普通管理员',
    description: '拥有部分管理权限',
    weight: '80',
    orderid: '2',
    status: '1',
    create_time: '2024-01-01 00:00:00'
  },
  {
    id: '3',
    name: '普通用户',
    role_name: '普通用户',
    description: '基础用户权限',
    weight: '60',
    orderid: '3',
    status: '1',
    create_time: '2024-01-01 00:00:00'
  }
]

// 员工数据
export const mockEmployees = [
  {
    id: '1',
    name: '管理员',
    realname: '管理员',
    mobile: '13800138000',
    email: 'admin@example.com',
    department_id: '1',
    department_name: '总经理办公室',
    dpname: '总经理办公室',
    role_id: '1',
    role_name: '超级管理员',
    status: '1',
    is_leave: '0',
    is_login: '1',
    addtime: '2024-01-01 00:00:00',
    create_time: '2024-01-01 00:00:00'
  },
  {
    id: '2',
    name: '张三',
    realname: '张三',
    mobile: '13800138001',
    email: 'zhangsan@example.com',
    department_id: '111',
    department_name: '前端组',
    dpname: '前端组',
    role_id: '3',
    role_name: '普通用户',
    status: '1',
    is_leave: '0',
    is_login: '1',
    addtime: '2024-01-02 00:00:00',
    create_time: '2024-01-02 00:00:00'
  },
  {
    id: '3',
    name: '李四',
    realname: '李四',
    mobile: '13800138002',
    email: 'lisi@example.com',
    department_id: '112',
    department_name: '后端组',
    dpname: '后端组',
    role_id: '3',
    role_name: '普通用户',
    status: '1',
    is_leave: '0',
    is_login: '0',
    addtime: '2024-01-03 00:00:00',
    create_time: '2024-01-03 00:00:00'
  },
  {
    id: '4',
    name: '王五',
    realname: '王五',
    mobile: '13800138003',
    email: 'wangwu@example.com',
    department_id: '113',
    department_name: '测试组',
    dpname: '测试组',
    role_id: '2',
    role_name: '普通管理员',
    status: '1',
    is_leave: '1',
    is_login: '0',
    addtime: '2024-01-04 00:00:00',
    create_time: '2024-01-04 00:00:00'
  }
]

// 系统配置数据
export const mockSystemConfig = {
  company_name: 'Mock管理系统',
  company_copyright: '© 2024 Mock Company',
  company_id: 'MOCK001',
  promotion_city: '北京',
  secured_ip: '192.168.1.0/24\n127.0.0.1',
  company_icp: '京ICP备12345678号',
  scrollbar: '1',
  upload_type: '1',
  bucket: 'mock-bucket',
  accesskeyid: 'mock-access-key-id',
  accesskeysecret: 'mock-access-key-secret',
  endpoint: 'oss-cn-beijing.aliyuncs.com',
  oss_domain: 'https://mock-bucket.oss-cn-beijing.aliyuncs.com',
  sms_channel: '1',
  sms_signname: 'Mock系统',
  logo: '', // 留空以测试文本显示
  time_node: '2024-01-01',
  system_name: 'Candy Sample',
  version: '1.2.0',
  favicon: '/favicon.svg',
  theme_color: '#409EFF'
}

// 登录日志数据
export const mockLoginLogs = [
  {
    id: '1',
    realname: '管理员',
    ip: '192.168.1.100',
    w: '4', // 星期四
    addtime: '2024-12-19 10:00:00',
    user_name: '管理员',
    mobile: '13800138000',
    location: '本地',
    browser: 'Chrome',
    os: 'Windows 10',
    login_time: '2024-12-19 10:00:00',
    status: '成功'
  },
  {
    id: '2',
    realname: '张三',
    ip: '192.168.1.101',
    w: '4', // 星期四
    addtime: '2024-12-19 09:30:00',
    user_name: '张三',
    mobile: '13800138001',
    location: '本地',
    browser: 'Firefox',
    os: 'Windows 10',
    login_time: '2024-12-19 09:30:00',
    status: '成功'
  },
  {
    id: '3',
    realname: '李四',
    ip: '192.168.1.102',
    w: '3', // 星期三
    addtime: '2024-12-18 16:45:00',
    user_name: '李四',
    mobile: '13800138002',
    location: '本地',
    browser: 'Safari',
    os: 'macOS',
    login_time: '2024-12-18 16:45:00',
    status: '成功'
  }
]

// 操作日志数据
export const mockOperationLogs = [
  {
    id: '1',
    eid: '1',
    realname: '管理员',
    type: '新增用户',
    operate_url: '/api/Employee/add',
    operate_desc: '新增用户：李四',
    addtime: '2024-12-19 10:30:00',
    user_name: '管理员',
    action: '新增用户',
    module: '用户管理',
    description: '新增用户：李四',
    ip: '192.168.1.100',
    create_time: '2024-12-19 10:30:00'
  },
  {
    id: '2',
    eid: '1',
    realname: '管理员',
    type: '修改角色',
    operate_url: '/api/role/edit',
    operate_desc: '修改角色权限',
    addtime: '2024-12-19 10:15:00',
    user_name: '管理员',
    action: '修改角色',
    module: '角色管理',
    description: '修改角色权限',
    ip: '192.168.1.100',
    create_time: '2024-12-19 10:15:00'
  },
  {
    id: '3',
    eid: '2',
    realname: '张三',
    type: '查看数据',
    operate_url: '/api/department/index',
    operate_desc: '查看部门列表',
    addtime: '2024-12-19 09:45:00',
    user_name: '张三',
    action: '查看数据',
    module: '部门管理',
    description: '查看部门列表',
    ip: '192.168.1.101',
    create_time: '2024-12-19 09:45:00'
  }
]

// 系统公告数据
export const mockNotices = [
  {
    id: '1',
    title: '系统维护通知',
    content: '系统将于今晚22:00-24:00进行维护，请提前保存工作。',
    type: '系统通知',
    status: '1',
    create_time: '2024-12-19 08:00:00',
    creator: '管理员'
  },
  {
    id: '2',
    title: '新功能上线',
    content: '新增了数据导出功能，欢迎使用。',
    type: '功能更新',
    status: '1',
    create_time: '2024-12-18 15:00:00',
    creator: '管理员'
  }
]
